#ifndef ANIMATION_H
#define ANIMATION_H

#include "EngineApi.h"
#include "AnimationInfo.h"

enum AnimationState
{
   STOP,
   PLAY,
   PAUSE,
};

class ENGINE_API Animation
{
public:
   Animation(AnimationInfo::AnimationInfoPtr animationInfo);

   void play();
   void stop();

   AnimationState getCurrentState(){ return m_currentState; }
   
   const AnimationInfo::AnimationInfoPtr getAnimationInfo() { return m_pAnimationInfo; }

   unsigned int getCurrentFrame(){ return m_currentFrame; }

   void update(float timeBetweenFrames);

private:
   AnimationInfo::AnimationInfoPtr m_pAnimationInfo;
   
   AnimationState m_currentState;

   unsigned int m_currentFrame;
   
   float m_currentFrameTime;
};

#endif//ANIMATION_H